<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.longtxt{width:300px;}
</style>
<script src="/js/jquery-1.5.1.min.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
	function VerifyPage(){
		if($("#sname").val() == ''){
			alert('网站名称不能为空!');
			return false;
		}
		return true;
	}
	function chooseTpl(){
		window.open('/cms/choosetpl/home','','width=350,height=350,left=' + (screen.availWidth - 350) / 2 + ',top=' + (screen.availHeight - 350) / 2);
	}
	function settpl(parm){		
		var ary = parm.split('|');
		if(ary.length == 2){
			var tid = ary[0];
			var tname = ary[1];
			$("#templatename").val(tname);
			$("#templateid").val(tid);
		}
	}
</script>
</head>
<body>
<form name="form1" action="/cms/savesite" method="post" onSubmit="return VerifyPage();">
<input type="hidden" name="sid" value="<?php echo $sid; ?>" />
<input type="hidden" name="dopost" value="save" />
<div class="listTitle">编辑网站</div>
<div>
<table cellpadding="5">
<tr><td>网站名称</td><td><input type="text" class="longtxt" id="sname" name="sname" value="<?=$sname?>" /></td></tr>
<tr><td>描述</td><td><input type="text" class="longtxt" id="descr" name="descr" value="<?=$descr?>" /></td></tr>
<tr><td>网址</td><td><input type="text" class="longtxt" id="surl" name="surl" value="<?=$surl?>" /></td></tr>
<tr><td>首页模板</td><td><input type="text" class="longtxt" id="templatename" name="templatename" value="<?=$templatename?>" /><input type="hidden" id="templateid" name="templateid" value="<?=$templateid?>" /><input type="button" value="..." onclick="chooseTpl()"></td></tr>
<tr><td>状态</td><td><input type="radio" id="sitestatus0" name="sitestatus" value="0" <?php if($sitestatus==0)echo('checked');?>  />启用&nbsp;&nbsp;<input type="radio" id="sitestatus1" name="sitestatus" value="1" <?php if($sitestatus==1)echo('checked');?> />禁用</td></tr>
<tr><td></td><td><input type="submit" value=" 保存 " />&nbsp;&nbsp;<input type="button" value="取消" onclick="window.location='/cms/sites'"/></td></tr>
</table>
</div>
</form>
</body>
</html>